package com.zx.stock.controllers;

import com.zx.stock.service.PerformanceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/per")
public class PerformanceController {

    @Autowired
    private PerformanceService performanceService;


    //列表
    @ResponseBody
    @RequestMapping(value = "/list",method = RequestMethod.GET)
    public String findByIcbc(){

        new Thread(){
            @Override
            public void run(){
                performanceService.loadPerformance();
            }
        }.start();
        return "线程执行，请耐心等待...";
    }
}
